[Symfony] Accessing user session from a custom routing class
Posted
by David
on Stack Overflow
See other posts from Stack Overflow
or by David
Published on 2010-03-16T15:46:14Z
Indexed on
2010/03/17
9:11 UTC
Read the original article
Hit count: 129
symfony
Is there some way to acces the user object from a custom routing class?
I'd like to add a parameter when generating a url, and that parameter is inside the user session, so I need to access it.
The only way I found to access is using the sfContext::getInstance()->getUser(), but it's known to be inefficient.
Thanks!
© Stack Overflow or respective owner